import React, { Component } from 'react';
import {
  SafeAreaView,
  StyleSheet,
  ScrollView,
  View,
  Text,
  StatusBar,
} from 'react-native';
import { connect } from 'react-redux';
import { TouchableOpacity } from 'react-native-gesture-handler';
import common from './common'

export default class TabHome extends Component {
    static navigationOptions = {
        title: '列表',
    };

    render() {
        return (
            <SafeAreaView style={{ flex: 1, }}>
                <View style={{ alignItems: 'center', padding: 20, }}>
                    <Text>{common.getActiveRouteName(this.props.nav)}</Text>
                </View>
                <View style={{ flex: 1, }}>
                    <Text style={{ alignSelf: 'center', }}>{this.props.sharedState.cale}</Text>
                    {/* <View style={{ flex: 1, flexDirection: 'row', justifyContent: 'space-around', }}>
                        <TouchableOpacity onPress={() => this.onPressPlus()}>
                            <Text>Plus</Text>
                        </TouchableOpacity>
                        <TouchableOpacity onPress={() => this.onPressMinus()}>
                            <Text>Minus</Text>
                        </TouchableOpacity>
                    </View> */}
                </View>
            </SafeAreaView>
        )
    }
}
